package com.itxx.keycase.countdownLatch;

import java.util.concurrent.CountDownLatch;

public class MThread  extends Thread {
    private CountDownLatch c;

    public MThread() {
    }

    public MThread(CountDownLatch c) {
        this.c = c;
    }

    @Override
    public void run() {
        System.out.println(getName()+":今天天气晴朗,出去打球,见鬼碰见小刚和小李,球给我拿跑了,还我球");
        try {
            c.await();
            System.out.println(getName()+":终于还我球了,回家");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
